home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CICA 1995 August
/
CICA - The Ultimate Collection of Shareware for Windows (Disc 2) (August 1995).iso
/
disc2
/
demo
/
pwrtcp11.exe
/
POWERFTP.HP_
/
POWERFTP.bin
Wrap
Text File
|
1994-11-11
|
3KB
|
84 lines
//
// CPowerFTP
// Defines the functions required to provide FTP protocol processing
//
class CFtpControl;
class CFtpListen;
class CFtpData;
class CPowerFtp
{
friend CFtpControl;
friend CFtpListen;
friend CFtpData;
private:
// references to Control, Listener, and Data are used so that FTP.HPP
// does not have to be distributed
CFtpControl &Control;
protected:
// protected functions must be overridden by derived classes...
// informs us of a successful connection and login
virtual void ConnectEvent (LPCSTR RemoteDotAddr,
WORD RemotePort, LPCSTR LocalDotAddr, WORD LocalPort,
LPCSTR LocalName);
// informs us that an exception
virtual void LogEvent (LPCSTR Message)=0;
// informs us that file or list data has been received
virtual void RecvEvent (LPVOID Data, size_t ByteCnt)=0;
// informs us that FTP has a reply
virtual void ReplyEvent (FTP_STATUS Status, FTP_COMMAND LastCommand, int Code, LPCSTR ReplyStr)=0;
// informs us that previously submitted data has been sent
virtual void SendEvent (DWORD Tag)=0;
CPowerFtp (HINSTANCE);
~CPowerFtp (void);
int operator = (CPowerFtp &);
public:
BOOL LoginHost (LPCSTR OemLicense, PT_FLAGS Flags, LPCSTR RemoteHost,
LPCSTR LocalDotAddr, LPCSTR User, LPCSTR Password, LPCSTR Account);
BOOL Close (void);
BOOL CloseData (void);
FTP_COMMAND LastCommand(void);
// Send Data over data connection
BOOL Send (LPVOID Data, size_t ByteCnt);
// Send User-built Command over control connection
BOOL Command (LPSTR CommandStr);
// ACCESS Control Commands
BOOL ChDir (LPSTR NewDir);
BOOL ChDirUp (void);
BOOL StructMount (LPSTR PathName);
BOOL Reinitialize (void);
BOOL Logout (void);
// TRANSFER Parameter Commands
BOOL Type (LPSTR Type);
BOOL Port (LPSTR HostPort);
BOOL Passive (void);
BOOL FileStruct (FTP_FILE_STRUCT Structure);
BOOL Mode (FTP_TRANSFER_MODE Mode);
// FILE Service Commands
BOOL Retrieve (LPSTR PathName);
BOOL Store (LPSTR PathName);
BOOL StoreUnique (LPSTR PathName);
BOOL Appe (LPSTR PathName);
BOOL Allocate (LONG MaxFileSize, LONG MaxRecordSize);
BOOL Restart (LPSTR Marker);
BOOL Rename (LPSTR FromPathName, LPSTR ToPathName);
BOOL Abort (void);
BOOL Delete (LPSTR PathName);
BOOL RemoveDir (LPSTR Dir);
BOOL MakeDir (LPSTR Dir);
BOOL PrintWorkingDir (void);
BOOL List (LPSTR Dir);
BOOL NameList (LPSTR Dir);
BOOL Site (LPSTR Desc);
BOOL System (void);
BOOL Status (LPSTR PathName);
BOOL Help (LPSTR Topic);
BOOL Noop (void);
};